﻿<!DOCTYPE html>
<!--suppress ALL-->
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet"
			href="css/table.css" type="text/css" />
		<link rel="stylesheet"
			href="css/cwcalendar.css" type="text/css">
		<script type="text/javascript"
			src="javascript/comm/comm.js">
		</script>
		<script type="text/javascript"
			src="javascript/comm/list.js">
		</script>
		<script type="text/javascript"
			src="javascript/calendar-ch.js">
		</script>
		<script type="text/javascript"
			src="javascript/jquery-1.7.2.js">
		</script>
		<script type="text/javascript"
			src="javascript/locate.js">
		</script>

		<script src="javascript/jquery-1.7.2.js"></script>
		<script>{
			$(function () {
				$(function () {
					$.ajax({
						//获取查询的路径
						url: 'queryAllFirstFile',
						//查询到的东西
						success: function (date) {
							//#firstKind下拉框的id,拿到下拉框
							let selectfirst = $("#firstKind");
							//通过循环获得查询到的集合里面的值
							for (let i = 0; i < date.length; i++) {
								//通过循环一条一条的把查询到的值注入到下拉框里面
								//date[i].first_kind_id下拉框获得的ID
								//date[i].first_kind_name下拉框里面的内容，获得对应的ID的内容
								selectfirst.append("<option value='" + date[i].first_kind_id + "'>" + date[i].first_kind_name + "</option>");
								// selectfirst.append("<input type='hidden' value="+date[i].first_kind_id+" name='first_kind_id'>");
							}
						}
					})

					$("#firstKind").change(function () {
						let text = $("#firstKind option:checked").text();
						$(":input[name='first_kind_name']").val(text);
						//#firstKind下拉框的id，获得下拉框的values
						let selectfirst = $("#firstKind").val();
						if (selectfirst != '0') {
							$.ajax({
								url: 'querysecondkind?first_kind_id=' + selectfirst,
								success: function (sb) {
									let secondKind = $("#secondKind");
									secondKind.text("");
									secondKind.append("<option selected value=''>全部</option>");
									let thirdKind = $("#thirdKind");
									thirdKind.text("");
									thirdKind.append("<option selected value=''>全部</option>");
									for (let i = 0; i < sb.length; i++) {
										secondKind.append("<option value='" + sb[i].second_kind_id + "'>" + sb[i].second_kind_name + "</option>")
										// secondKind.append("<input type='hidden' value="+sb[i].second_kind_id+" name='second_kind_id'>");
									}
								}
							});
						} else {
							let secondKind = $("#secondKind");
							secondKind.text("");
							secondKind.append("<option selected value=''>全部</option>");
							let thirdKind = $("#thirdKind");
							thirdKind.text("");
							thirdKind.append("<option selected value=''>全部</option>");
						}
					})
					$("#secondKind").change(function () {

						let text01 = $("#secondKind option:checked").text();
						$(":input[name='second_kind_name']").val(text01);
						let secondKind = $("#secondKind").val();
						if (secondKind != 0) {
							$.ajax({
								url: 'querythird?second_kind_id=' + secondKind,
								success: function (hengchusheng) {
									let thirdKind = $("#thirdKind");
									thirdKind.text("");
									thirdKind.append("<option selected value=''>全部</option>");
									for (let i = 0; i < hengchusheng.length; i++) {
										thirdKind.append("<option value='" + hengchusheng[i].third_kind_id + "'>" + hengchusheng[i].third_kind_name + "</option>")
										// thirdKind.append("<input type='hidden' value="+hengchusheng[i].third_kind_id+" name='third_kind_id'>");
									}
								}
							})
						} else {

							let thirdKind = $("#thirdKind");
							thirdKind.text("");
							thirdKind.append("<option value=''>全部</option>");
						}
					})
					$("#thirdKind").change(function () {
						let text02 = $("#thirdKind option:checked").text();
						$(":input[name='third_kind_name']").val(text02);
					})
				})
				$(function () {


					$.ajax({
						url: 'querymajorkind',
						success: function (date) {
							let majorKind = $("#majorKind");
							for (let i = 0; i < date.length; i++) {
								majorKind.append("<option value='" + date[i].major_kind_id + "'>" + date[i].major_kind_name + "</option>")
								// majorKind.append("<input type='hidden' value="+date[i].major_kind_id+" name='human_major_kind_id'>");
							}
						}
					});
					$("#majorKind").change(function () {
						let text03 = $("#majorKind option:checked").text();
						$(":input[name='human_major_kind_name']").val(text03);
						let majorKind = $("#majorKind").val()
						$.ajax({
							url: 'querymajor?mfk_id=' + majorKind,
							success: function (date) {
								let majorName = $('#majorName');
								majorName.text("")
								majorName.append("<option selected value=''>全部</option>");
								for (let i = 0; i < date.length; i++) {
									majorName.append("<option value='" + date[i].major_id + "'>" + date[i].major_name + "</option>")
									// majorKind.append("<input type='hidden' value="+date[i].major_id+" name='human_major_id'>");
								}
							}
						})
					})
					$("#majorName").change(function () {
						let text04 = $("#majorName option:checked").text();
						$(":input[name='hunma_major_name']").val(text04);
					})

				})
				$(function () {


					$.ajax({
						url: 'querymajorkind',
						success: function (date) {
							let majorKind = $("#majorKind");
							for (let i = 0; i < date.length; i++) {
								majorKind.append("<option value='" + date[i].major_kind_id + "'>" + date[i].major_kind_name + "</option>")
								// majorKind.append("<input type='hidden' value="+date[i].major_kind_id+" name='human_major_kind_id'>");
							}
						}
					});
					$("#majorKind").change(function () {
						let majorKind = $("#majorKind").val()
						$.ajax({
							url: 'querymajor?mfk_id=' + majorKind,
							success: function (date) {
								let majorName = $('#majorName');
								majorName.text("")
								majorName.append("<option selected value=''>全部</option>");
								for (let i = 0; i < date.length; i++) {
									majorName.append("<option value='" + date[i].major_id + "'>" + date[i].major_name + "</option>")
									// majorKind.append("<input type='hidden' value="+date[i].major_id+" name='human_major_id'>");
								}
							}
						})
					})

				})
			})
		}

		</script>
	<body>
	<form method="post" action="queryhumanlist03">
		<table width="100%">
			<tr>
				<td>
					<font color="black">您正在做的业务是：人力资源--人力资源档案管理--人力资源档案查询 </font>
				</td>
			</tr>
			<tr>
				<td align="right">
					<input type="submit" value="查询" class="BUTTON_STYLE1"/>
					<input type="button" value="搜索" class="BUTTON_STYLE1"
						   onclick="location.href='query_keywords.html'">
					<input type="hidden" th:remove="all" name="result" value="toQueryList"/>
				</td>
			</tr>
		</table>
		<table width="100%" border="1" cellpadding=0 cellspacing=1
			   bordercolorlight=#848284 bordercolordark=#eeeeee
			   class="TABLE_STYLE1">
			<tr class="TR_STYLE1">
				<td width="16%" class="TD_STYLE1">
					请选择员工所在I级机构
				</td>
				<td width="84%" class="TD_STYLE2">
					<input th:remove="all" type="hidden" name="first_kind_name"/>
					<select name="first_kind_id" size="5" id="firstKind"
							class="SELECT_STYLE2">
						<option value="" selected="selected">全部</option>

						<option value="1353318953319" th:remove="all">Ⅰ级结构</option>

						<option value="1353318929919" th:remove="all">集团</option>

						<option value="1353318937391" th:remove="all">总部</option>

					</select>
				</td>
			</tr>
			<tr>
				<td class="TD_STYLE1">
					请选择员工所在II级机构
				</td>
				<td width="84%" class="TD_STYLE2">
					<input type="hidden" th:remove="all" name="second_kind_name"/>
					<select name="second_kind_id" size="5" id="secondKind"
							class="SELECT_STYLE2">
						<option value="" selected="selected">
							全部
						</option>

						<option value="1353318983380" th:remove="all">Ⅱ级结构2</option>

						<option value="1353318986625" th:remove="all">Ⅱ级结构3</option>

						<option value="1353318990197" th:remove="all">Ⅱ级结构4</option>

						<option value="1353318995252" th:remove="all">Ⅱ级结构5</option>

						<option value="1353319004705" th:remove="all">软件公司</option>

						<option value="1353319016546" th:remove="all">科技公司</option>

						<option value="1353319033409" th:remove="all">北京分校区</option>

						<option value="1353319038682" th:remove="all">湖南分校区</option>

						<option value="1353319043830" th:remove="all">湖北分校区</option>

						<option value="1353318979558" th:remove="all">Ⅱ级结构1</option>

					</select>
				</td>
			</tr>
			<tr class="TR_STYLE1">
				<td width="16%" class="TD_STYLE1">
					请选择员工所在III级机构
				</td>
				<td width="84%" class="TD_STYLE2">
					<input type="hidden" th:remove="all" name="third_kind_name"/>
					<select name="third_kind_id" class="SELECT_STYLE2" size="5" id="thirdKind">
						<option value="" selected="selected">
							全部
						</option>

						<option value="1353319130551" th:remove="all">外包公司</option>

						<option value="1353319150238" th:remove="all">软件股份有限公司</option>

						<option value="1353319177944" th:remove="all">中关村分校区1</option>

						<option value="1353319185073"th:remove="all">中关村分校区2</option>

						<option value="1353319193840" th:remove="all">中关村分校区3</option>

						<option value="1353319216320" th:remove="all">长沙分校区1</option>

						<option value="1353319228535" th:remove="all">长沙分校区2</option>

						<option value="1353319236725" th:remove="all">长沙分校区3</option>

						<option value="1353319077370" th:remove="all">Ⅲ级结构111</option>

						<option value="1353319096948" th:remove="all">Ⅲ级结构222</option>

					</select>
				</td>
			</tr>
			<tr>
				<td class="TD_STYLE1">
					请选择职位分类
				</td>
				<td width="84%" class="TD_STYLE2">
					<input type="hidden" th:remove="all" name="human_major_kind_name"/>
					<select name="human_major_kind_id" size="5" id="majorKind"
							class="SELECT_STYLE2">
						<option value="" selected="selected">
							全部
						</option>

						<option value="01" th:remove="all">销售</option>

						<option value="02" th:remove="all">软件开发</option>

						<option value="03" th:remove="all">人力资源</option>

						<option value="04" th:remove="all">生产部</option>

					</select>
				</td>
			</tr>
			<tr class="TR_STYLE1">
				<td width="16%" class="TD_STYLE1">
					请选择职位名称
				</td>
				<td width="84%" class="TD_STYLE2">
					<input type="hidden" th:remove="all" name="hunma_major_name"/>
					<select name="hunma_major_id" size="5" class="SELECT_STYLE2" id="majorName">
						<option value="" selected="selected">
							全部
						</option>

						<option value="01" th:remove="all">区域经理</option>

						<option value="02" th:remove="all">总经理</option>

						<option value="01" th:remove="all">项目经理</option>

						<option value="02" th:remove="all">程序员</option>

						<option value="01" th:remove="all">人事经理</option>

						<option value="02" th:remove="all">专员</option>

						<option value="01" th:remove="all">主任</option>

						<option value="02" th:remove="all">技术工人</option>

					</select>
				</td>
			</tr>
			<tr>
				<td class="TD_STYLE1">
					请输入建档时间
				</td>
				<td width="84%" class="TD_STYLE2">
					<input type="text" name="startDate"
						   style="width: 14%" class="INPUT_STYLE2" id="date_start">
					至
					<input type="text" name="endDate"
						   style="width: 14%" class="INPUT_STYLE2" id="date_end">
					<input type="hidden" th:remove="all" name="utilBean.datePropertyName" value="registTime"/>
				</td>
			</tr>
		</table>
	</form>
	</body>
</html>
